# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=ofono-phonesim
pkgver=2.0
pkgrel=0
pkgdesc="Phone Simulator for modem testing"
url="https://git.kernel.org/pub/scm/network/ofono/phonesim.git/"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake qt5-qtdeclarative-dev"
source="https://git.kernel.org/pub/scm/network/ofono/phonesim.git/snapshot/phonesim-$pkgver.tar.gz"
builddir="$srcdir/phonesim-$pkgver"
options="!check" # No tests

prepare() {
	default_prepare

	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install

	mv -v "$pkgdir"/usr/bin/phonesim "$pkgdir"/usr/bin/ofono-phonesim
	mv -v "$pkgdir"/usr/share/phonesim "$pkgdir"/usr/share/ofono-phonesim
}

sha512sums="
63222b9b4928638b7a6f3a05f33988586143227adf07bbaaeb7ee9301e7647e1bea111834bc89d8963ee57fae539eb73b2474bbd442ce9fe77c9a80af15130ac  phonesim-2.0.tar.gz
"
